package com.ego.common.vo.product;

import lombok.Getter;
import lombok.Setter;

/**
 * @program: ego
 * @description: SkuId - hasStock
 * @author: KamTang
 * @create: 2022-11-29 11:13
 **/
@Setter
@Getter
public class SkuInStockVo {
    private Long skuId;
    private Boolean hasStock;

    public static SkuInStockVo build(Long skuId, Long count) {
        SkuInStockVo skuInStockVo = new SkuInStockVo();
        skuInStockVo.setSkuId(skuId);
        skuInStockVo.setHasStock(count != null && count > 0);
        return skuInStockVo;
    }
}
